<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>添加学生信息</title>
    <link rel="stylesheet" type="text/css" href="styles.css">
    <style>
        .form-container {
            width: 100%;
            max-width: 500px; /* 限制表单的最大宽度 */
            margin: 0 auto; /* 使表单居中 */
            padding: 20px;
            background-color: #fff;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            border-radius: 16px;
        }

        .form-container form {
            display: flex;
            flex-direction: column;
            gap: 15px; /* 增加表单项之间的间距 */
        }

        .form-container input[type="text"],
        .form-container input[type="date"],
        .form-container select {
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 5px;
            width: 100%;
        }

        .form-container input[type="submit"] {
            padding: 10px;
            border: none;
            background-color: #007bff;
            color: white;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s;
        }

        .form-container input[type="submit"]:hover {
            background-color: #0056b3;
        }

        .form-container label {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .form-container .radio-group {
            display: flex;
            gap: 10px;
        }
    </style>
</head>
<body>
<div class="form-container">
    <h1>添加学生信息</h1>
    <form action="addStudent" method="post">
        <input type="hidden" name="sId" value="${stu.sId}">
        <input type="text" name="sName" placeholder="学生姓名">
        <input type="date" name="birth" placeholder="生日">

        <div class="radio-group">
            <label>
                <input type="radio" name="gender" value="男" checked> 男
            </label>
            <label>
                <input type="radio" name="gender" value="女"> 女
            </label>
        </div>

        <select name="cId">
            <option value="">请选择班级</option>
            <c:forEach items="${clazzList}" var="clazz">
                <option value="${clazz.cId}">${clazz.cName}</option>
            </c:forEach>
        </select>

        <input type="submit" value="提交">
    </form>
</div>
</body>
</html>
